Link

Register company SERVER-SIDE

Step 1: Register company

The most basic way to perform a registration is via the Register Companies call. The ERP-id is a unique never changing ID of the company in your system. This is typically some kind of primary key in your database or a GUID.

Request Example

POST /v1/api/companies/register/ HTTP/1.1
APIKey: --YOUR API KEY HERE--
Content-Type: application/json; charset=utf-8
Host: testapi.inexchange.se
Content-Length: 265
Expect: 100-continue
{
  "erpId": "635604692357550266",
  "orgNo": "083440-2861",
  "vatNo": "SE083440286101",
  "name": "Demo Company 083440-2861",
  "erpProduct": "DEMO Product 1.0",
  "city": "Skövde",
  "countryCode": "SE",
  "languageCode": "sv-SE",
  "email": "example@inexchange.se",
  "isVatRegistered": true,
  "processes": [
    "SendInvoices",
    "ReceiveInvoices"
  ]
}

Response Example

HTTP/1.1 202 Accepted
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 2
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Date: Tue, 26 May 2026 12:54:10 GMT

Step 2: Request a token

To perform an update on your company you will need a token to perform actions with. You create tokens with the Create Token call. Tokens can be set to be valid for a period of time or set to never expire. You need to decide if you want to store the token of each company in your system, or request a new one for each communication session. We recommend that tokens are created with a short TTL of 10 minutes.

Request Example

POST /v1/api/clientTokens/create HTTP/1.1
APIKey: --YOUR API KEY HERE--
Content-Type: application/json; charset=utf-8
Host: testapi.inexchange.se
Content-Length: 183
Expect: 100-continue

{
  "erpId": "635604692357550266",
  "validTo": "2026-05-26T12:54:10"
}

Response Example

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 63
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Date: Tue, 26 May 2026 12:54:10 GMT

{
  "token": "--CLIENT TOKEN HERE--"
}

Step 3: Check registration status

After initating a request to register a company the registration process status can be followed by issueing a Companies Status call. This will return the status of the registration and is mainly used to monitor the progress of the registration. For further details and recommendations see Registration state transitions

Request Example

GET /v1/api/companies/status/ HTTP/1.1
ClientToken: --CLIENT TOKEN HERE--
Host: testapi.inexchange.se
Connection: close
Accept: */*

Response Example

HTTP/1.1 200 OK
Cache-Control: no-cache
Pragma: no-cache
Content-Length: 626
Content-Type: application/json; charset=utf-8
Expires: -1
Server: Microsoft-IIS/8.5
X-AspNet-Version: 4.0.30319
Date: Tue, 26 May 2026 12:54:10 GMT

{
  "status": "Registered",
  "companyId": "ebe0a437-7b80-499c-8db6-066ca8b92111",
  "details": {
    "name": "Demo Company 083440-2861",
    "altName": "",
    "gln": "",
    "streetName": "",
    "postBox": "",
    "city": "Skövde",
    "postalZone": "",
    "countryCode": "SE",
    "phoneNo": "",
    "orgNo": "083440-2861",
    "vatNo": "SE083440286101",
    "processes": [
      "SendInvoices",
      "ReceiveInvoices"
    ],
    "address": "",
    "address2": "",
    "postalCode": ""
  }
}